package org.magento.pages;

import org.magento.data.AdminData;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

//This class presents admin/index/forgotpassword/ page

public class ForgotAdminPassword extends Page {
	
	//Locators: 
	
	@FindBy (id = "email")
	public WebElement emailField;
	
	@FindBy (css ="button.forgot-password")
	public WebElement retrievePasswordButton;
	
	//Functions: 	
	public LoginPageBeckEnd restorePassword (AdminData admin) {
	type(emailField, admin.email );
	retrievePasswordButton.click();
	return PageFactory.initElements(driver, LoginPageBeckEnd.class);
	}
 
	//Auto - generated
	public ForgotAdminPassword(WebDriver driver) {
		super(driver);
	}

	@Override
	public void open() {
		 	
	}

}
